package net;

import java.io.*;

public class Test4 {
    public static void main(String[] args) {
        String path="D:\\javacode\\javacode\\J2025_1_3\\hello.txt";

        BufferedReader bufferedReader=null;

        try {
            bufferedReader=new BufferedReader(new FileReader(path));

            char []buf=new char[10];
            int readLen=0;

            while((readLen=bufferedReader.read(buf))!=-1){
                System.out.println(new String(buf,0,readLen));
            }



        } catch (IOException e) {
            throw new RuntimeException(e);
        }finally {
            try {
                bufferedReader.close();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
    }
}
